<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib  uri="http://java.sun.com/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en" class="login-content" data-ng-app="materialAdmin">
 <head>
  <meta charset="UTF-8"> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Material Admin</title>

  <link rel="${pageContext.request.contextPath}/imges/shortcut icon" type="image/x-icon" href="favicon.ico" />
  <!-- Vendor CSS -->
  <link href="${pageContext.request.contextPath}/css/material-design-iconic-font/css/material-design-iconic-font.min.css" rel="stylesheet" type="text/css">
  <!-- CSS -->
  <link href="${pageContext.request.contextPath}/css/app.min.1.css" rel="stylesheet" type="text/css">
 </head>
 <body class="login-content" data-ng-controller="loginCtrl as lctrl">

    <div class="lc-block" id="l-login" data-ng-class="{'toggled':lctrl.login === 1}">
    	<h1 class="lean">Login</h1>

    	<div class="input-group m-b-20">
    		<span class="input-group-addon">
    			<i class="zmdi zmdi-account"></i>
    		</span>
    	
    	<form action="${pageContext.request.contextPath}/submitLogin.do" method="post">
    		<div class="fg-line">
    		<!-- 用户名 -->
    			<input name="username" type="text" class="form-control" placeholder="Username" regex="^\w{3,16}$"/>
    		</div>
    	</div>

        <div class="input-group m-b-20">
    		<span class="input-group-addon">
    			<i class="zmdi zmdi-male"></i>
    		</span>
    		<!-- 密码 -->
    		<div class="fg-line">
    			<input name="password" type="password" class="form-control" placeholder="Password" regex="^\w+"/>
    		</div>
    	</div>
			<!-- 登录 -->    	 
    		<div>
    			<input type="submit" value="登录">
    		</div>
    	</form>
    	
    	<div>
    		<span style="color: red;">${error}</span>
        </div>
    	
    	<div class="clearfix"></div>
    	
    	<div class="checkbox">
    		<label>
    			<input type="checkbox" value="" />
    			<i class="input-helper">
    				保持登录状态
    			</i>
    		</label>
    	</div>
    	
        <!-- 登录按钮 -->
       
    	<a href="" class="btn btn-login btn-danger btn-float"  onclick="submit()">
    		<i class="zmdi zmdi-arrow-forward"></i>
    	</a>
        
        <ul class="login-navigation">
        	<li class="bgm-red" data-ng-click="lctrl.login = 0; lctrl.register = 1">Register</li>
        	<li data-block="#l-forget-password" class="bgm-orange" data-ng-click="lctrl.login = 0; lctrl.forgot = 1">Forgot Password?</li>
        </ul>
    </div>
    
    <div class="lc-block" id="l-register" data-ng-class="{ 'toggled': lctrl.register === 1 }" data-ng-if="lctrl.register === 1">
    	<h1 class="lean">Azrael</h1>

    	<div class="input-group m-b-20">
    		<span class="input-group-addon">
    			<i class="zmdi zmdi-account"></i>
    		</span>
    		<div class="fg-line">
    			<input type="text" class="form-control" placeholder="Username" regex="^\w{3,16}$"/>
    		</div>
    	</div>

        <div class="input-group m-b-20">
    		<span class="input-group-addon">
    			<i class="zmdi zmdi-email"></i>
    		</span>
    		<div class="fg-line">
    			<input type="text" class="form-control" placeholder="Email Address" regex="^\w+@\w+\.[a-zA-Z]+(\.[a-zA-Z]+)?$"/>
    		</div>
    	</div>

        <div class="input-group m-b-20">
    		<span class="input-group-addon">
    			<i class="zmdi zmdi-male"></i>
    		</span>
    		<div class="fg-line">
    			<input type="password" class="form-control" placeholder="Password" regex="^\w+"/>
    		</div>
    	</div>
    	
   	
    	<div class="clearfix"></div>
    	
    	<div class="checkbox">
    		<label>
    			<input type="checkbox" value=""/>
    			<i class="input-helper"></i>
    			接受许可协议
    		</label>
    	</div>
    	
    	<a href="" class="btn btn-login btn-danger btn-float"><i class="zmdi zmdi-arrow-forward"></i></a>
    
    	<ul class="login-navigation">
	      <li data-block="#l-login" class="bgm-green" data-ng-click="lctrl.register = 0; lctrl.login = 1">Login</li>
	      <li data-block="#l-forget-password" class="bgm-orange" data-ng-click="lctrl.register = 0; lctrl.forgot = 1">Forgot Password?</li>
	    </ul>
    </div>

    <div class="lc-block" id="l-forget-password" data-ng-class="{ 'toggled': lctrl.forgot === 1 }" data-ng-if="lctrl.forgot === 1">
    	<h1 class="lean">Azrel</h1>
    	<p class="text-lef t">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla eu risus. Curabitur commodo lorem fringilla enim feugiat commodo sed ac lacus.</p>
    	<div class="input-group m-b-20">
	      <span class="input-group-addon"><i class="zmdi zmdi-email"></i></span>
	      <div class="fg-line">
	        <input type="text" class="form-control" placeholder="Email Address" regex="^\w+@\w+\.[a-zA-Z]+(\.[a-zA-Z]+)?$"/>
	      </div>
	    </div>
	
	    <a href="" class="btn btn-login btn-danger btn-float"><i class="zmdi zmdi-arrow-forward"></i></a>
	
	    <ul class="login-navigation">
	      <li data-block="#l-login" class="bgm-green" data-ng-click="lctrl.forgot = 0; lctrl.login = 1">Login</li>
	      <li data-block="#l-register" class="bgm-red" data-ng-click="lctrl.forgot = 0; lctrl.register = 1">Register</li>
	    </ul>
    </div>
 </body>
    <script type="text/javascript">
 		function submit(){
 		   $.ajax({                      //注意更换环境时需要主要这里的项目名
               url:'http://localhost:8080/renfeicaomu/testLogin.do',
               type:'POST',
               data:{
                   username:$('#username').val(),
                   password:$('#password').val(),
               },
               beforeSend:function(){
                   alert('在发送之前');
               },
               success:function(data,response,status){
        
                   if(data>0){
                      
                   }else{
                      
                   }
               }
           });
 		}		
    </script>
 	
 	<script src="${pageContext.request.contextPath}/js/bower_components/jquery/dist/jquery.min.js"></script>
	<script src="${pageContext.request.contextPath}/js/log.js"></script>
	<!-- Angular -->
	<script src="${pageContext.request.contextPath}/js/bower_components/angular/angular.min.js"></script>
	<script src="${pageContext.request.contextPath}/js/bower_components/angular-resource/angular-resource.min.js"></script>
	<script src="${pageContext.request.contextPath}/js/bower_components/angular-animate/angular-animate.min.js"></script>
	
	
	<!-- Angular Modules -->
	<script src="${pageContext.request.contextPath}/js/bower_components/angular-ui-router/release/angular-ui-router.min.js"></script>
	<script src="${pageContext.request.contextPath}/js/bower_components/angular-loading-bar/src/loading-bar.js"></script>
	<script src="${pageContext.request.contextPath}/js/bower_components/oclazyload/dist/ocLazyLoad.min.js"></script>
	<script src="${pageContext.request.contextPath}/js/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
	
	<!-- Common js -->
	<script src="${pageContext.request.contextPath}/js/bower_components/angular-nouislider/src/nouislider.min.js"></script>
	<script src="${pageContext.request.contextPath}/js/bower_components/ng-table/dist/ng-table.min.js"></script>
	
	<!-- Placeholder for IE9 -->
	<!--[if IE 9 ]>
	    <script src="js/bower_components/jquery-placeholder/jquery.placeholder.min.js"></script>
	<![endif]-->
	<!-- App level -->
	<script src="${pageContext.request.contextPath}/js/app.js"></script>
	<script src="${pageContext.request.contextPath}/js/controllers/main.js"></script>
	<script src="${pageContext.request.contextPath}/js/controllers/ui-bootstrap.js"></script>
	
	
	<!-- Template Modules -->
	<script src="${pageContext.request.contextPath}/js/modules/form.js"></script>
</html>